package com.zpz.framework.zpzoauth.common.redis;

import java.util.List;
import java.util.concurrent.TimeUnit;

/**
 * @author zhangpanzhi
 * @time 2019-07-09
 * @description 未经本人允许请勿随便改动，尊重劳动
 * */
public interface ZpzOauthRedisService {

    boolean set(final String key, final String value);

    boolean set(final String key, final String value, long expire);

    boolean setNX(final String key, final String value);

    String getSet(final String key, final String value);

    String get(final String key);

    boolean incr(final String key, long expireTime);

    boolean delete(String key);

    boolean expire(final String key, long expire);

    long getExpire(final String key);

    long getExpire(final String key, TimeUnit timeUnit);

    <T> boolean setList(String key, List<T> list);

    <T> List<T> getList(String key, Class<T> clz);

    long lpush(final String key, Object obj);

    long rpush(final String key, Object obj);

    String lpop(final String key);
}
